package com.lonton.task;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.lonton.service.MailService;

@Component
public class MailSchedualler {
	@Autowired
	private MailService mailService;
	
	@Value("${mail.toMail.addr}")
	private String to;
	@Scheduled(fixedRate=6000)
	public void process() {
		mailService.sendSimpleMail(to, "任和是猪", "任和是臭猪猪");
	}
}
